﻿using System.Collections.Generic;
using System.Web.Mvc;


namespace MyExtensions
{
    public static class TextBoxHelper
    {
        public static string SysTextBox(this HtmlHelper htmlHelper, string name, string value)
        {
			return SysTextBox(htmlHelper, name, value, null);
		}
		public static string SysTextBox(this HtmlHelper htmlHelper, string name, string value, IDictionary<string, object> htmlAttributes)
		{
            var builder = new TagBuilder("input");
            builder.MergeAttributes(htmlAttributes);
            builder.MergeAttribute("type", "text");
            builder.MergeAttribute("name", name, true);
            builder.MergeAttribute("id", name, true);
            builder.MergeAttribute("sys:value", value, true);
            return builder.ToString(TagRenderMode.SelfClosing);
}
    }
}
